﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Brouteforce.gameObjs.gamePiece;
//using Brouteforce.managers;
//using Microsoft.Xna.Framework;

//namespace Brouteforce.gameObjs {
//    public class Tile{
//        public Sprite Sprite;
//        public List<GamePiece> ContainedGamePieces;
//        private Color _backupHlColor;
//        private bool highlighted;
//        public int XIndex;
//        public int YIndex;

//        public Tile(Rectangle screenLocation, int xIndex, int yIndex){
//            Sprite = new Sprite(BFGame.TileGround, screenLocation);
//            ContainedGamePieces = new List<GamePiece>();
//            XIndex = xIndex;
//            YIndex = yIndex;
//        }

//        public void Draw(int cameraX, int cameraY){
//            Sprite.Draw(cameraX, cameraY);
//        }

//        public void DrawPlayers(int cameraX, int cameraY) {
//            ContainedGamePieces.ForEach(gp => gp.Draw(cameraX, cameraY));
//        }

//        public void Update() {
//            ContainedGamePieces.ForEach(gp => gp.Update());
//        }

//        public void Highlight(Color hlcolor){
//            _backupHlColor = Sprite.TintColor;
//            Sprite.TintColor = hlcolor;
//            highlighted = true;
//        }

//        public void Lowlight(){
//            Sprite.TintColor = _backupHlColor;
//            highlighted = false;
//        }

//        public bool Contain(Type type){
//            return ContainedGamePieces.Any(gc => gc.GetType() == type);
//        }
        
//        public bool ContainOtherThan(Type type) {
//            return ContainedGamePieces.Any(gc => gc.GetType() != type);
//        }

//        public bool IsHighlighted() {
//            return highlighted;
//        }

//        public GamePiece GetPlayerGamePiece()
//        {
//            foreach (var containedGamePiece in ContainedGamePieces)
//            {
//                if (!containedGamePiece.BelongsToPlayer.Equals(GameManager.ComputerId))
//                {
//                    return containedGamePiece;
//                }
//            }

//            return null;
//        }

//    }
//}
